home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmMain
- BorderStyle = 1 'Fixed Single
- Caption = "wesCommonLibrary Sample"
- ClientHeight = 1395
- ClientLeft = 360
- ClientTop = 585
- ClientWidth = 3780
- Height = 1800
- Left = 300
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1395
- ScaleWidth = 3780
- Top = 240
- Width = 3900
- Begin VB.CommandButton cmdMain
- Caption = "Center"
- Default = -1 'True
- Height = 375
- Left = 1260
- TabIndex = 0
- Top = 480
- Width = 1155
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- ' Written for West End Software, Inc.
- ' Copyright
- 1997 Michael L. Jones
- ' All Rights Reserved.
- ' Warning: This computer program is protected by
- ' copyright law and international treaties.
- ' Unauthorized reproduction or distribution of this
- ' program, or any portion of it, may result in
- ' severe civil and criminal penalties, and will be
- ' prosecuted to the maximum extent possible under
- ' the law.
- Option Explicit
- ' wesCommonLibrary sample project
- ' private constants
- Private Const csModName = "frmMain"
- ' replace with resource file string if you end up
- ' using something like this
- Private Const csMsgCenter = _
- "An error occurred centering the form:"
- ' events
- Private Sub cmdMain_Click()
- On Error GoTo CatchError
- Const csProcName = csProjName & "." & _
- csModName & ".cmdMain_Click"
- ' center on the screen
- Library.CenterWindow Me
- Exit Sub
- CatchError:
- ' replace with you choice of error handling
- ' display an error message
- DisplayError csMsgCenter, Err.Number, _
- Err.Description, csProcName
- Exit Sub
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- On Error Resume Next
- ' terminate the application
- MainModule.Terminate
- End Sub
-